#ifndef VERTEXBUFFER_H
#define VERTEXBUFFER_H

#include "Buffer.h"
#include "Include.h"

namespace devii
{

class VertexBuffer : Buffer
{
public:
	VertexBuffer(ID3D11Device * device, ID3D11DeviceContext* context);
	~VertexBuffer();

	// Creates a buffer and sets this data to that specific buffer
	void pushBuffer(const void * const data, const unsigned int nr_of_vertices, const unsigned int size, const unsigned int offset, const bool changeable);
	
	ID3D11Buffer ** getBuffer();
	const unsigned int getSize() const;
	const unsigned int* getStrides() const;
	const unsigned int* getOffsets() const;
	void setInputLayout(ID3D11InputLayout* const input_layout);
	ID3D11InputLayout* getInputLayout() const;
	void setPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY topology);
	const D3D11_PRIMITIVE_TOPOLOGY getTopology() const;

private:
	// This contains more than one buffer, so we can support multiple streams
	// to the graphicscard
	std::vector<ID3D11Buffer *> buffers;
	std::vector<unsigned int> sizes;
	std::vector<unsigned int> offsets;

	ID3D11InputLayout* input_layout;

	D3D11_PRIMITIVE_TOPOLOGY topology;
};

}
#endif